echo "=== 检查MySQL ==="
sudo systemctl status mysql | grep Active

echo -e "\n=== 检查Redis ==="
sudo systemctl status redis-server | grep Active

echo -e "\n=== 测试Redis连接 ==="
redis-cli ping

echo -e "\n=== 测试MySQL连接 ==="
mysql -u root -p -e "SELECT VERSION();"